package com.xs.anxingo.server.api.service;

import com.xs.anxingo.server.api.req.AddHouseInfoRequest;
import com.xs.anxingo.server.api.resp.BaseResponse;
import com.xs.anxingo.server.dao.AxgInfHouseDao;
import com.xs.anxingo.server.dao.entity.AxgInfHouse;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2019/12/10.
 */
@SuppressWarnings("ALL")
@Service
public class HouseAPIService {

    @Autowired
    private AxgInfHouseDao axgInfHouseDao;

    public BaseResponse doAddHouseInfo(AddHouseInfoRequest request) {

        AxgInfHouse axgInfHouse = new AxgInfHouse();
        BeanUtils.copyProperties(request, axgInfHouse);

        axgInfHouseDao.insert(axgInfHouse);

        return BaseResponse.buildSuccess();
    }

}
